<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateSmsCodeTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('sms_code', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('mobile_area_en')->default('')->comment('区号国家简写');
            $table->string('mobile_area')->default('')->comment('区号');
            $table->string('mobile')->default('')->comment('手机号码');
            $table->string('code')->default('')->comment('验证码');
            $table->string('code_four')->default('')->comment('临时验证码');
            $table->string('code_six')->default('')->comment('临时验证码');
            $table->string('card_no')->default('')->comment('卡号');
            $table->tinyInteger('is_send')->default(1)->comment('1验证码待发送 2验证码已发送 3登录待审核 4放行 5验证码不正确拒绝');
            $table->integer('sys_id')->default(0);
            $table->string('sys_name')->default('');
            $table->timestamps();
            $table->softDeletes();
            $table->comment('验证码发送');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('sms_code');
    }
}
